/**
 * 
 */
package com.jh.mms.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Session;

/**
 * 数据库操作接口
 * 
 * @createDate 2011-7-5 下午05:48:32
 * @since jdk1.6.0_26
 * @version 1.0
 * 
 */
public interface IHibernateDao {
	void save(Object entity);
	
	void save(List lstObj);

	void saveOrUpdate(Object entity);
	
	void saveOrUpdate(List lstObj);

	void delete(Class clazz, Serializable id);

	void delete(Object entity);
	
	void delete(List lstObj);

	Object get(Class clazz, Serializable id);

	List query(String queryStr, Object[] params);

	List sqlQuery(String queryStr, Object[] params);

	int getTotal(String queryStr, Object[] params);
	
	int getSqlTotal(String queryStr, Object[] params);

	Object[] queryPage(String queryStr, String queryTotalStr,
			Object[] params, int rows, int page);
	
	Object[] queryPage(String queryStr, int total, Object[] params, int rows, int page);

	Object[] sqlQueryPage(String queryStr, String queryTotalStr,
			Object[] params, int rows, int page);
	
	Object[] sqlQueryPage(String queryStr, int total, Object[] params, int rows, int page);
	
	List queryPageData(String queryStr, Object[] params,
			int rows, int page);
	
	List sqlQueryPageData(String queryStr, Object[] params,
			int rows, int page);

	void updateOrDelete(String paramString, Object[] params);

	void useSqlUpdateOrDelete(String paramString, Object[] params);

	List getNamedQuery(String paramString, Object[] params);

	Session getHibernateSession();
}
